using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace StupidSpaceThing
{
	internal class GraphicGuide : Guide
	{
		private Texture2D graphic;
		private float scale;

		public GraphicGuide(Texture2D graphic, float scale, double duration)
			: base(duration) {			
			this.graphic = graphic;
			this.scale = scale;
		}

		public override void Draw(SpriteBatch spriteBatch) {
			int finalWidth = (int)(graphic.Width * scale);
			int finalHeight = (int)(graphic.Height * scale);
			spriteBatch.Draw(graphic,
				new Rectangle(spriteBatch.GraphicsDevice.Viewport.Width / 2 - finalWidth / 2, spriteBatch.GraphicsDevice.Viewport.Height / 2 - finalHeight / 2, finalWidth, finalHeight), 
				Color);
			base.Draw(spriteBatch);
		}
	}
}
